package jd.client.get;

import java.util.List;

import jd.client.Response;
import jd.client.exception.ResponseParseException;
import jd.client.xml.impl.DownloadsParser;
import jd.entity.DownloadPackage;

/**
 * @author Denis Migol
 * 
 */
public class GetDownloadsAllListResponse extends Response {

	private List<DownloadPackage> downloads;

	@Override
	public Response parse(final String response) throws ResponseParseException {
		setDownloads(new DownloadsParser().parse(response));
		return super.parse(response);
	}

	/**
	 * @param downloads
	 *            the downloads to set
	 */
	public void setDownloads(final List<DownloadPackage> downloads) {
		this.downloads = downloads;
	}

	/**
	 * @return the downloads
	 */
	public List<DownloadPackage> getDownloads() {
		return downloads;
	}

}
